/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "SENDSMS", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sendsms.findAll", query = "SELECT s FROM Sendsms s"),
    @NamedQuery(name = "Sendsms.findBySendsmsHistoryId", query = "SELECT s FROM Sendsms s WHERE s.sendsmsHistoryId = :sendsmsHistoryId"),
    @NamedQuery(name = "Sendsms.findByMsisdn", query = "SELECT s FROM Sendsms s WHERE s.msisdn = :msisdn"),
    @NamedQuery(name = "Sendsms.findByCallbackId", query = "SELECT s FROM Sendsms s WHERE s.callbackId = :callbackId"),
    @NamedQuery(name = "Sendsms.findBySrcaddr", query = "SELECT s FROM Sendsms s WHERE s.srcaddr = :srcaddr"),
    @NamedQuery(name = "Sendsms.findBySendtime", query = "SELECT s FROM Sendsms s WHERE s.sendtime = :sendtime"),
    @NamedQuery(name = "Sendsms.findByMessage", query = "SELECT s FROM Sendsms s WHERE s.message = :message"),
    @NamedQuery(name = "Sendsms.findByStatus", query = "SELECT s FROM Sendsms s WHERE s.status = :status"),
    @NamedQuery(name = "Sendsms.findBySelected", query = "SELECT s FROM Sendsms s WHERE s.selected = :selected"),
    @NamedQuery(name = "Sendsms.findByLastUpdatedTime", query = "SELECT s FROM Sendsms s WHERE s.lastUpdatedTime = :lastUpdatedTime")})
public class Sendsms implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "SENDSMS_HISTORY_ID")
    private BigDecimal sendsmsHistoryId;
    @Size(max = 15)
    @Column(name = "MSISDN")
    private String msisdn;
    @Size(max = 60)
    @Column(name = "CALLBACK_ID")
    private String callbackId;
    @Size(max = 15)
    @Column(name = "SRCADDR")
    private String srcaddr;
    @Column(name = "SENDTIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date sendtime;
    @Size(max = 2000)
    @Column(name = "MESSAGE")
    private String message;
    @Size(max = 10)
    @Column(name = "STATUS")
    private String status;
    @Column(name = "SELECTED")
    private BigInteger selected;
    @Column(name = "LAST_UPDATED_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastUpdatedTime;

    public Sendsms() {
    }

    public Sendsms(BigDecimal sendsmsHistoryId) {
        this.sendsmsHistoryId = sendsmsHistoryId;
    }

    public BigDecimal getSendsmsHistoryId() {
        return sendsmsHistoryId;
    }

    public void setSendsmsHistoryId(BigDecimal sendsmsHistoryId) {
        this.sendsmsHistoryId = sendsmsHistoryId;
    }

    public String getMsisdn() {
        return msisdn;
    }

    public void setMsisdn(String msisdn) {
        this.msisdn = msisdn;
    }

    public String getCallbackId() {
        return callbackId;
    }

    public void setCallbackId(String callbackId) {
        this.callbackId = callbackId;
    }

    public String getSrcaddr() {
        return srcaddr;
    }

    public void setSrcaddr(String srcaddr) {
        this.srcaddr = srcaddr;
    }

    public Date getSendtime() {
        return sendtime;
    }

    public void setSendtime(Date sendtime) {
        this.sendtime = sendtime;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigInteger getSelected() {
        return selected;
    }

    public void setSelected(BigInteger selected) {
        this.selected = selected;
    }

    public Date getLastUpdatedTime() {
        return lastUpdatedTime;
    }

    public void setLastUpdatedTime(Date lastUpdatedTime) {
        this.lastUpdatedTime = lastUpdatedTime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sendsmsHistoryId != null ? sendsmsHistoryId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sendsms)) {
            return false;
        }
        Sendsms other = (Sendsms) object;
        if ((this.sendsmsHistoryId == null && other.sendsmsHistoryId != null) || (this.sendsmsHistoryId != null && !this.sendsmsHistoryId.equals(other.sendsmsHistoryId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.Sendsms[ sendsmsHistoryId=" + sendsmsHistoryId + " ]";
    }
    
}
